<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>管理中心 - 添加用户</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/system/general.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}/css/system/main.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}/css/system/category.css" rel="StyleSheet" type="text/css" />	
	<link href="${ctx}/css/system/dtree.css" rel="StyleSheet" type="text/css" />	
	<script type="text/javascript" src="${ctx}/js/jquery-1.4.min.js"></script>
	<script type="text/javascript">
	var contextPath = "${ctx}";
	</script>
	<script type="text/javascript" src="${ctx}/js/dtree.js"></script>
</head>
<body>
<h1>
<span class="action-span"><a href="${ctx}/system/user/manage">用户列表</a></span>
<span class="action-span1"><a href="#">管理中心</a>  - 添加用户 </span>
<div style="clear:both"></div>
</h1>

<div class="main-div">
  <form:form  modelAttribute="user" action="${ctx}/system/user" method="post" name="theForm" id="theForm" onsubmit="this.submit.disabled='true';">
  <table width="100%" id="general-table">
      <tr>
        <td class="label"><form:label for="loginName" path="loginName" cssErrorClass="error">登录帐号</form:label></td>
        <td>
          <form:input path="loginName" size="15"  maxlength="20"/> <font color="red">*</font> <form:errors path="loginName" /></td>
      </tr>
      <tr>
        <td class="label">登录密码</td>
        <td>
          <form:input path="loginPassword" size="15"  maxlength="20"/></td>
      </tr>
      <tr>
        <td class="label">确认密码</td>
        <td>
          <input id="confirmLoginPassword" name="confirmLoginPassword" size="15" /></td>
      </tr>
      <tr>
        <td class="label">用户角色</td>
        <td>
        <select name="roleId" id="roleId">
        <c:forEach items="${roleList}" var="itemTemp">
          <c:choose>
              <c:when test="${itemTemp.id==user.role.id}">
          <option value="${itemTemp.id}" selected="selected">${itemTemp.name}</option>
              </c:when>
	          <c:otherwise>
          <option value="${itemTemp.id}">${itemTemp.name}</option>
	          </c:otherwise>
          </c:choose>
        </c:forEach>
        </select>
         </td>
      </tr>
      <tr>
        <td class="label"><form:label for="name" path="name" cssErrorClass="error">名称</form:label></td>
        <td>
          <form:input path="name" maxlength="20" size="15" /> <form:errors path="name" /></td>
      </tr>
      </table>
  </form:form>
</div>
</body>
</html>